#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QThread>
#include <QDebug>
class MyThread : public QThread
{
    Q_OBJECT
public:
    explicit MyThread(QObject *parent = nullptr);
    ~MyThread();
private:
    bool isRun;

protected:
    void run();//线程启动 自动运行函数

signals:
    void isDone();

public:
    void setFlag(bool flag=false);
    bool getFlag();
};

#endif // MYTHREAD_H
